import request from '@/utils/request'

// 查询分类名称列表
export function listCategorize(query) {
  return request({
    url: '/system/help/categorize/list',
    method: 'get',
    loading: true,
    params: query
  })
}

// 查询分类名称详细
export function getCategorize(id) {
  return request({
    url: '/system/help/categorize/' + id,
    method: 'get',
    loading: true
  })
}

// 新增分类名称
export function addCategorize(data) {
  return request({
    url: '/system/help/categorize',
    method: 'post',
    loading: true,
    data: data
  })
}

// 修改分类名称
export function updateCategorize(data) {
  return request({
    url: '/system/help/categorize',
    method: 'put',
    loading: true,
    data: data
  })
}

// 删除分类名称
export function delCategorize(id) {
  return request({
    url: '/system/help/categorize/' + id,
    method: 'delete',
    loading: true
  })
}

// 获取选择框列表
export function optionselect() {
  return request({
    url: '/system/help/categorize/optionselect',
    method: 'get',
    loading: true
  })
}

// 查询字典数据列表
export function listData(query) {
  return request({
    url: '/system/help/data/list',
    method: 'get',
    loading: true,
    params: query
  })
}

// 查询字典数据详细
export function getData(id) {
  return request({
    url: '/system/help/data/' + id,
    method: 'get',
    loading: true
  })
}

// 新增字典数据
export function addData(data) {
  return request({
    url: '/system/help/data',
    method: 'post',
    loading: true,
    data: data
  })
}

// 修改字典数据
export function updateData(data) {
  return request({
    url: '/system/help/data',
    method: 'put',
    loading: true,
    data: data
  })
}

// 删除数据
export function delData(id) {
  return request({
    url: '/system/help/data/' + id,
    method: 'delete',
    loading: true
  })
}
